{extend name='main'}

{block name="button"}

{if auth("add")}
<button data-open='{:url("add")}' data-title="添加评级" class='layui-btn layui-btn-sm layui-btn-primary' >添加评级</button>
{/if}

<!--style ="VISIBILITY: hidden"  隐藏属性-->
{if auth("remove")}
<button  data-action='{:url("remove")}' data-csrf="{:systoken('remove')}" data-rule="id#{key}" class='layui-btn layui-btn-sm layui-btn-primary'>删除评级</button>
{/if}

{/block}
{block name="content"}
<div  class="think-box-shadow">
    {include file='qiyecredit/index_search'}
    <table class="layui-table" lay-skin="line">
        {notempty name='list'}
        <thead>
        <tr>
            <th class='list-table-check-td think-checkbox'>
                <label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
            </th>
            <th class='layui-hide-xs'>企业名称</th>
            <th class='layui-hide-xs'>认定级别</th>
            <th class='layui-hide-xs'>认定依据</th>
            <th class='layui-hide-xs'>认定时间</th>
            <th class='layui-hide-xs'>备注</th>
            <th class='layui-hide-xs'>操作</th>
        </tr>
        </thead>
        {/notempty}
        <tbody>
        {foreach $list as $key=>$vo}

        <tr  data-dbclick>
            <td class='list-table-check-td think-checkbox'>
                <label><input class="list-check-box" value='{$vo.id}' type='checkbox'></label>
            </td>
            <td class="nowrap">{$vo.qiye_info.name}</td>
            <td class="nowrap">{$vo.level}</td>
            <td class="nowrap">
                {foreach $vo.pics as $key2=>$vo2}
                <div><a target="_blank" href="{$vo2}">{$vo2}</a></div>
                {/foreach}
            </td>
            <td class="nowrap">{$vo.occur_time|format_datetime='Y-m-d H:i'}</td>
            <td class="nowrap">{$vo.notes}</td>
            <td  class='text-center nowrap notselect'>
                {if auth("edit")}
                <a data-dbclick class="layui-btn layui-btn-xs" data-title="编辑信息" data-open='{:url("edit")}?id={$vo.id}'>编 辑</a>
                {/if}
            </td>
        </tr>

        {/foreach}
        </tbody>
    </table>
    {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
</div>
{/block}


